package com.dk.controller;

import com.dk.pojo.User;
import com.dk.result.Result;
import com.dk.result.ResultConstant;
import com.dk.service.UserService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("user")
@Api(tags = "用户接口文档")
public class UserController {

    @Autowired
    private UserService userService;

    @PostMapping("selectUserAll")
    @ApiOperation("用户查询")
    public Result selectUserAll(){
        List<String> userList = userService.selectUserAll();
        return new Result(ResultConstant.CODE,ResultConstant.MESSAGE,userList);
    }
}